<?php

/**
 * User form base class.
 *
 * @package    FinalsClub
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseUserForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                    => new sfWidgetFormInputHidden(),
      'email'                 => new sfWidgetFormInput(),
      'first_name'            => new sfWidgetFormInput(),
      'last_name'             => new sfWidgetFormInput(),
      'username'              => new sfWidgetFormInput(),
      'md5_password'          => new sfWidgetFormInput(),
      'language'              => new sfWidgetFormInput(),
      'country'               => new sfWidgetFormInput(),
      'avatar'                => new sfWidgetFormInput(),
      'gender'                => new sfWidgetFormInput(),
      'birthdate'             => new sfWidgetFormDate(),
      'network_id'            => new sfWidgetFormInput(),
      'network_name'          => new sfWidgetFormInput(),
      'standing'              => new sfWidgetFormInput(),
      'timezone'              => new sfWidgetFormInput(),
      'tos_agreement'         => new sfWidgetFormInput(),
      'receive_email_updates' => new sfWidgetFormInput(),
      'copyright_agreement'   => new sfWidgetFormInput(),
      'admin'                 => new sfWidgetFormInput(),
      'created_at'            => new sfWidgetFormDateTime(),
      'updated_at'            => new sfWidgetFormDateTime(),
      'last_login_at'         => new sfWidgetFormDateTime(),
      'login_count'           => new sfWidgetFormInput(),
      'activated'             => new sfWidgetFormInput(),
      'facebook_id'           => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'                    => new sfValidatorPropelChoice(array('model' => 'User', 'column' => 'id', 'required' => false)),
      'email'                 => new sfValidatorString(array('max_length' => 100)),
      'first_name'            => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'last_name'             => new sfValidatorString(array('max_length' => 40, 'required' => false)),
      'username'              => new sfValidatorString(array('max_length' => 60, 'required' => false)),
      'md5_password'          => new sfValidatorString(array('max_length' => 64)),
      'language'              => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'country'               => new sfValidatorString(array('max_length' => 2, 'required' => false)),
      'avatar'                => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'gender'                => new sfValidatorString(array('max_length' => 6, 'required' => false)),
      'birthdate'             => new sfValidatorDate(array('required' => false)),
      'network_id'            => new sfValidatorInteger(array('required' => false)),
      'network_name'          => new sfValidatorString(array('max_length' => 60, 'required' => false)),
      'standing'              => new sfValidatorString(array('max_length' => 80, 'required' => false)),
      'timezone'              => new sfValidatorInteger(array('required' => false)),
      'tos_agreement'         => new sfValidatorInteger(array('required' => false)),
      'receive_email_updates' => new sfValidatorInteger(array('required' => false)),
      'copyright_agreement'   => new sfValidatorInteger(array('required' => false)),
      'admin'                 => new sfValidatorInteger(array('required' => false)),
      'created_at'            => new sfValidatorDateTime(array('required' => false)),
      'updated_at'            => new sfValidatorDateTime(array('required' => false)),
      'last_login_at'         => new sfValidatorDateTime(array('required' => false)),
      'login_count'           => new sfValidatorInteger(array('required' => false)),
      'activated'             => new sfValidatorInteger(array('required' => false)),
      'facebook_id'           => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('user[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'User';
  }


}
